<script>
import {getOriginUrl} from "../../apis/shorten"
export default {
  name: "index",
  render(createElement, context) {
    const url = this.$route.params['url']
    getOriginUrl(url).then(res => {
      const {data: {data: url}} = res
      console.log(url)
      if (url !== null) {
        window.location.replace(url)
      }
    }).catch(err => console.error(err))
  },
}
</script>

<style scoped>

</style>